<template>
	<view>
		<view>
			<table-title content="白卡退卡申请表"></table-title>
			<view>
				<small-title content="基本资料"></small-title>
				<view class="item-table">
					<view-item name="申请人" :value="personMsg.personName"></view-item>
					<view-item name="手机号码" :value="personMsg.phoneNumber"></view-item>
					<view-item name="租户名称" :value="personMsg.companyName"></view-item>
					<view-item name="楼盘" :value="personMsg.building"></view-item>
					<view-item name="楼层" :value="personMsg.floor"></view-item>
					<view-item name="单元" :value="personMsg.room"></view-item>
					<input-item typeMsg="数量"></input-item>
					<view-item name="押金" :isLast="true"></view-item>
				</view>
				<button class="confirm-button" @click="confirm">确认</button>
				<view style="height: 200rpx;"></view>
			</view>
		</view>
		<u-tabbar v-model="current" :list="list" :before-switch="clickTabbar"></u-tabbar>
	</view>
</template>

<script>
	export default{
		data() {
			return {
				personMsg:{
					'id':'liyang',
					'personName':'李阳',
					'phoneNumber':'19705015234',
					'companyName':'福建海峡科技有限公司',
					'building':'福建八闽大厦',
					'floor':'15',
					'room':'1501'
				},
				list: [
					{
						iconPath: "home",
						selectedIconPath: "home-fill",
						text: '首页',
						customIcon: false,
					},
					{
						iconPath: "photo",
						selectedIconPath: "photo-fill",
						text: '管家',
						customIcon: false,
					},
					{
						iconPath: "https://cdn.uviewui.com/uview/common/min_button.png",
						selectedIconPath: "https://cdn.uviewui.com/uview/common/min_button_select.png",
						text: '发现',
						customIcon: false,
					},
					{
						iconPath: "play-right",
						selectedIconPath: "play-right-fill",
						text: '消息',
						count: 23,
						customIcon: false,
					},
					{
						iconPath: "account",
						selectedIconPath: "account-fill",
						text: '我的',
					},
				],
				current: 0
			}
		},
		methods: {
			clickTabbar(index) {
				switch(index){
					case 0:
						console.log('首页')
						uni.redirectTo({
							url:'/pages/home/home'
						})
						return true
						break
					case 1:
						console.log('管家')
						return true
						break
					case 2:
						console.log('发现')
						return true
						break
					case 3:
						console.log('消息')
						uni.redirectTo({
							url:'/pages/systemAnnoucement/list/list'
						})
						return true
						break
					case 4:
						console.log('我的')
						uni.navigateTo({
							url:'/pages/myPage/myPage'
						})
						return true
						break
				}
			},
			confirm() {
				uni.navigateTo({
					url:'../returnHistory/returnHistory'
				})
			}
		},
	}
</script>

<style>
	page{
		background-color: #F1F1F1
	}
	.item-table{
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	.confirm-button{
		background-color: #007AFF;
		color: #FFFFFF;
		width: 650rpx;
		margin-top: 50rpx;
		border-radius: 50rpx;
	}
</style>
